<!DOCTYPE html>
<html>
<head>
    <title>{{ $query->config('webname') }}</title>
    <meta name="keywords" content="{{ $query->config('keywords') }}"/>
    <meta name="description" content="{{ $query->config('description') }}" />
    <link rel="stylesheet" href="/public/asserts/lib/bootstrap-3.3.7/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="/public/asserts/lib/bootstrap-3.3.7/dist/css/bootstrap-theme-one.min.css" />
    <link rel="stylesheet" href="/public/asserts/lib/font-awesome/css/font-awesome.css"/>
    <script type="text/javascript" src="/public/statics_v2/js/libs/jquery.min.js"></script>
    <script type="text/javascript" src="/public/asserts/lib/bootstrap-3.3.7/dist/js/bootstrap.js" ></script>
    <style>
        *{border-radius: 0 !important;}
        a{color:#337ab7;}
        .pagination>.active>a, .pagination>.active>span, .pagination>.active>a:hover, .pagination>.active>span:hover, .pagination>.active>a:focus, .pagination>.active>span:focus{background: #375a7f;}
        .pagination>li>a, .pagination>li>span{background: #337ab7;}
        .pagination>.disabled>span, .pagination>.disabled>span:hover, .pagination>.disabled>span:focus, .pagination>.disabled>a, .pagination>.disabled>a:hover, .pagination>.disabled>a:focus{background: #337ab7;}
        .pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{background: #375a7f;}
    </style>
</head>
<body>



<div class="container-fluid">
    <div class="page-header no-border-bottom">
        <div class="container">
            <h3>{{ $query->config('webname') }}</h3>
        </div>
    </div>
</div>

<nav class="navbar navbar-default">
    <div class="container">
        <nav class="nav navbar-nav">
            @foreach( $query->menus() as $key => $val )
                @if($val['pid'] == 0)
                    <li class="">
                        @if(!empty($val['sub'])) <a href="{{ $val['url'] }}" target="{{ $val['target'] }}" class="dropdown-toggle" data-toggle="dropdown" >{{ $val['title'] }}<span class="caret"></span></a>@else <a href="{{ $val['url'] }}" target="{{ $val['target'] }}"  >{{ $val['title'] }}</a> @endif
                        @if(!empty($val['sub']))
                            @foreach($val['sub'] as $sk => $sv)
                                <ul class="dropdown-menu">
                                    <li><a href="{{ $sv['url'] }}" target="{{ $sv['target'] }}">{{ $sv['title'] }}</a></li>
                                </ul>
                            @endforeach
                        @endif
                    </li>
                @endif
            @endforeach
        </nav>
    </div>
</nav>


<div class="container">
    <div class="row">
        <div class="col-md-8">
            @yield('content')
        </div>

        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    文章分类
                </div>
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item"><a href="/posts?cid=0">未分类</a></li>
                        @foreach($query->postsCat() as $key => $val )
                        <li class="list-group-item"><a href="/posts?cid={{ $val->id }}">{{ $val->title }}</a></li>
                        @endforeach
                    </ul>
                </div>
            </div>
        </div>
    </div>

</div>


<div class="footer">
    <hr />
    <div class="container">
        <p class="text-center">备案号：{{ $query->config('icp') }}&nbsp;&nbsp;&nbsp;&nbsp;{{ $query->config('copyright') }}</p>
    </div>
</div>

<script type="text/javascript">
    $('.dropdown-toggle').dropdown()
</script>
</body>
</html>